﻿<Window x:Class="SweetWeather.AboutWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="AboutWindow" Height="300" Width="450" WindowStyle="None" AllowsTransparency="True">
    <Window.Resources>
        <Style x:Key="MessageBoxButtonStyle"
           TargetType="{x:Type Button}">
            <Setter Property="Focusable"
                Value="False" />
            <!--<Setter Property="Foreground"
                Value="{DynamicResource TM_SubTitleForeground}" />-->
            <Setter Property="Padding"
                Value="2" />
            <Setter Property="BorderThickness"
                Value="1" />
            <Setter Property="Background"
                Value="Transparent" />
            <Setter Property="BorderBrush"
                Value="White" />
            <Setter Property="Foreground"
                Value="White" />
            <Setter Property="HorizontalAlignment"
                Value="Center" />
            <Setter Property="VerticalAlignment"
                Value="Center" />
            <Setter Property="HorizontalContentAlignment"
                Value="Center" />
            <Setter Property="VerticalContentAlignment"
                Value="Center" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Border x:Name="Bd"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Background="{TemplateBinding Background}"
                            Padding="{TemplateBinding Padding}"
                            SnapsToDevicePixels="True">
                            <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}"
                                          Content="{TemplateBinding Content}"
                                          ContentStringFormat="{TemplateBinding ContentStringFormat}"
                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver"
                                 Value="True">
                                <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="White" />
                                <Setter Property="Background"
                                    TargetName="Bd"
                                    Value="#1D82DA" />
                                <Setter Property="Foreground"
                                    Value="White" />
                            </Trigger>
                            <Trigger Property="IsPressed"
                                 Value="True">
                                <Setter Property="BorderBrush"
                                    TargetName="Bd"
                                    Value="#1D82DA" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
    <Border Background="Gray" Opacity="0.8" BorderBrush="#1D82DA"  BorderThickness="2" Margin="0">
        <Border.Effect>
            <DropShadowEffect Color="#FF004289" Opacity="0.705" BlurRadius="12" ShadowDepth="1" />
        </Border.Effect>
        <Grid x:Name="grid">
            <Grid.RowDefinitions>
                <RowDefinition Height="auto" />
                <RowDefinition Height="*" />
                <RowDefinition Height="auto" />
            </Grid.RowDefinitions>
            <TextBlock x:Name="textBlock" Text="关于" Grid.Row="0" Margin="10,4" TextTrimming="CharacterEllipsis" Foreground="White" />
            <Border Grid.Row="0" BorderBrush="White" BorderThickness="0,0,0,1"/>
            <StackPanel  Grid.Row="1">
                <TextBlock Text="所有天气数据来自中国天气网（www.weather.com.cn）和天气预报网（www.tianqiyubao.com）,图片等素材均取材于互联网。本程序仅用于WPF交流使用，请勿用于商业用途。" Margin="10" TextTrimming="None" Foreground="White" TextWrapping="WrapWithOverflow" FontSize="15" />
                <TextBlock Text="本程序采用微软wpf技术编写，自己也是刚开始接触wpf，难免会有些不足。意见或建议请联系作者邮箱。" Margin="10,5,0,5" TextTrimming="None" Foreground="White" TextWrapping="WrapWithOverflow" FontSize="13" />
                <TextBlock Text="版本：Beat v0.0.0.1" Margin="10,5,0,5" TextTrimming="None" Foreground="White" TextWrapping="WrapWithOverflow" FontSize="13" />
                <TextBlock Text="" Margin="10,5,0,5" TextTrimming="None" Foreground="White" TextWrapping="WrapWithOverflow" FontSize="13" >
                    <TextBlock Text="博客地址："/>
                    <TextBlock Text="http://www.cnblogs.com/xcong/" Name="tblcnblogs" Cursor="Hand" TextDecorations="UnderLine" MouseLeftButtonDown="tblcnblogs_MouseLeftButtonDown" />
                </TextBlock>
                <TextBlock Text="作者邮箱：jsxzemail@163.com" Margin="10,5,0,5" TextTrimming="None" Foreground="White" TextWrapping="WrapWithOverflow" FontSize="13" />
            </StackPanel>
            <Button Style="{StaticResource MessageBoxButtonStyle}" Margin="5" Width="50" Grid.Row="2" Name="btnClose" Click="btnClose_Click" Content="关闭" HorizontalAlignment="Right"/>
        </Grid>
    </Border>
</Window>
